<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAppsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apps', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('type')->default('1')->comment('类型 1安卓 2IOS');
            $table->string('name')->default('')->comment('APP名');
            $table->string('wapurl')->default('')->comment('WAP跳转链接');
            $table->tinyInteger('iswap')->default('0')->comment('是否跳转');
            $table->string('splash')->default('')->comment('启动图片');
            $table->string('package_name')->default('')->comment('包名');
            $table->string('remarks')->default('')->comment('备注');
            $table->string('appkey')->default('')->comment('APPKEY');
            $table->string('appseret')->default('')->comment('APP秘钥');
            $table->tinyInteger('status')->default('0')->comment('上架状态0 未上架  1审核中  2已上架 3已下架');
            $table->integer('visits')->default('0')->comment('访问次数');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apps');
    }
}
